Zhiyong Zhang's Psychometric Website
 
Home Control Panel Login Register Search Submit Logout About me Contact me
My Research
Google
Web
This Site
Home > A program to manipulate Lawley (1943)'s selction formula
A program to manipulate Lawley (1943)'s selction formula
2006-09-21    Zhang, Z. & Nesselroade, J. R.       Read: 6307 times
Cite this page: Zhang, Z. & Nesselroade, J. R. (2006). A program to manipulate Lawley (1943)'s selction formula. Retrieved November 21, 2024, from https://www.psychstat.org/us/article.php/64.htm.
A program to manipulate Lawley (1943)'s selction formula

This program can be downloaded here.

File name: Readme.txt
Description: An introduction to selection.exe
Time: June, 2005

Some features:
1. Judge if an input matrix is covariance matrix or not
2. Any combination of the selection variables

--How to use--

Selection.exe is a program to calculate the correlation matrix and mean vector after selection
using the Lawley (1943) formula.

There are two ways to run the program. One way is simply to double click the file selection.exe and
following the instruction on the screen.
Another way to run dos command window. Go to "start" - "run" and input cmd in the popout window.
then go to the folder where you save the selection.exe file. This way is recommended for debuging.

Here is an example to run the program using the second way.

First, go to the file folder and type in "selection" and press down "return":
C:\zzy\cpluslib\file\test\Release>selection


---------------------------------------------
| Program name: Selection.exe               |
| By Zhiyong Zhang & John R. Nesselroade    |
| See readme.txt for more information       |
---------------------------------------------


Please input the output file name:
out.txt
Please input the file name for the original covariance matrix:
orig.txt
The covariance matrix in the input file is:
    10.00000000      3.00000000      2.00000000      1.00000000
     3.00000000      9.00000000      3.00000000      2.00000000
     2.00000000      3.00000000      8.00000000      3.00000000
     1.00000000      2.00000000      3.00000000      7.00000000

Please input the file name for the selection covariance matrix:
selec.txt
The covariance matrix in the input file is:
     2.00000000      1.00000000
     1.00000000      2.00000000

You have chosen 2 selection variable(s)
The 1 selection variable is:
4
The 2 selection variable is:
1
The selection variable(s) is(are):
     4.00000000
     1.00000000

The non selection variable(s) are:
     2.00000000
     3.00000000

Do you want to investigate the selection effect on means- Y or N?
y
Please input the file name for the selection means:
mean.txt
The means in the input file are:
     3.00000000
     2.00000000

The correlation matrix after selection is:
     1.00000000      0.50000000      0.19095907      0.26001043
     0.50000000      1.00000000      0.19816507      0.19403763
     0.19095907      0.19816507      1.00000000      0.28610698
     0.26001043      0.19403763      0.28610698      1.00000000

The means after selection are:
     1.28985507
     1.53623188

The output file looks like
---------------------------------------------
| Program name: Selection.exe               |
| By Zhiyong Zhang & John R. Nesselroade    |
| See readme.txt for more information       |
---------------------------------------------


Mon Dec 05 20:15:44 2005

You have chosen 2 selection variable(s)
The selection variable(s) are:
              4
              1


The covariance matrix before selection is:
              9              3
              3              8

The covariance matrix before selection is:
              7              1              2              3
              1             10              3              2
              2              3              9              3
              3              2              3              8

The covariance matrix after selection is:
              2              1     0.76811594     0.97101449
              1              2     0.79710145     0.72463768
     0.76811594     0.79710145      8.0898971      2.1489183
     0.97101449     0.72463768      2.1489183      6.9733249

The correlation matrix before selection is:
              1     0.11952286     0.25197632     0.40089186
     0.11952286              1     0.31622777      0.2236068
     0.25197632     0.31622777              1     0.35355339
     0.40089186      0.2236068     0.35355339              1

The correlation matrix after selection is:
              1            0.5     0.19095907     0.26001043
            0.5              1     0.19816507     0.19403763
     0.19095907     0.19816507              1     0.28610698
     0.26001043     0.19403763     0.28610698              1

The means after selection are::
      1.2898551
      1.5362319

 

Note: The file name can be input with folder like c:\data\a.txt. But it is recommended to put the data file
and the program in the same folder.

Submitted by: johnny
Add a comment View comment Add to my favorite Email to a friend Print
If you want to rate, please login first, or click here to register. Or you can use USERNAME: guest and PASSWORD: guest to log in.
Average score 0, based on 0 comments
1 2 3 4 5 6 7 8 9 10
Copyright © 2003-13 Zhiyong Zhang \'s Psychometric Website
Maintained by Zhiyong Zhang